home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / Signs.Dxr / 00022.ls < prev    next >
Encoding:
Text File  |  1997-11-18  |  1.4 KB  |  53 lines

  1. on mixEmUp
  2.   repeat with f = 5 to 16
  3.     set the visible of sprite f to 1
  4.   end repeat
  5.   repeat with f = 5 to 16
  6.     set the castNum of sprite f to the number of cast "back"
  7.   end repeat
  8.   repeat with f = 1 to 6
  9.     set sprite1 to 0
  10.     set sprite2 to 0
  11.     repeat with W = 1 to 2
  12.       set used to 1
  13.       repeat while used
  14.         set randomSprite to random(12)
  15.         set randomSprite to randomSprite + 4
  16.         if the castNum of sprite randomSprite = the number of cast "back" then
  17.           set used to 0
  18.           if sprite1 <> 0 then
  19.             if randomSprite <> sprite1 then
  20.               set sprite2 to randomSprite
  21.             else
  22.               set used to 1
  23.             end if
  24.             next repeat
  25.           end if
  26.           set sprite1 to randomSprite
  27.         end if
  28.       end repeat
  29.     end repeat
  30.     set good to 0
  31.     repeat while not good
  32.       set tempRand to random(8)
  33.       set tempRand to tempRand + 2
  34.       set rand2 to random(10)
  35.       if rand2 > 5 then
  36.         set tempRand to tempRand + 20
  37.       end if
  38.       set duplicate to 0
  39.       repeat with T = 5 to 16
  40.         if the castNum of sprite T = tempRand then
  41.           set duplicate to 1
  42.         end if
  43.       end repeat
  44.       if not duplicate then
  45.         set the castNum of sprite sprite1 to tempRand
  46.         set the castNum of sprite sprite2 to tempRand + 10
  47.         set good to 1
  48.       end if
  49.     end repeat
  50.   end repeat
  51.   updateStage()
  52. end
  53.